<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class QRCodeController extends Controller
{
    public function index(Request $request)
    {

        return view('app_down');


    }

    public function isWeiXin(){

    }


    public function isAndroid(){

    }

    public function isIos(){

    }


    public function get_device_type()
    {

        $agent = strtolower($_SERVER['HTTP_USER_AGENT']);

        $type ='other';

        if(strpos($agent,'iphone') || strpos($agent,'ipad'))
        {
            $type ='ios';
        }

        if(strpos($agent,'android')) {
            $type ='android';
        }

        if ( strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false ) {
            $type ='weixin';
        }



        return $type;
}



}
